package com.sjs.flow.http.exception;

import com.sjs.flow.protocol.PlatformErrorCode;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * @author uto_dev_008
 * @desc
 * @since 2021/11/22 15:44
 * Copyright (c) 2021 南京友拓信息技术有限公司 All rights reserved
 */
public class PlatformException extends AbstractApiException {
    private static final Logger logger = LoggerFactory.getLogger(PlatformException.class);
    private static final long serialVersionUID = 8929814939980921225L;

    public static final int DEFAULT_ERROR_CODE = PlatformErrorCode.SYS_ERROR.getCode();

    public PlatformException(String message) {
        super(message, DEFAULT_ERROR_CODE);
    }


    public PlatformException(int code) {
        super("", code);
    }

    public PlatformException(int code, String message) {
        super(message, code);
    }


    /**
     * 业务推荐使用
     *
     * @param message
     * @param code
     */
    public PlatformException(String message, int code) {
        super(message, code);
    }

    public PlatformException(String message, int code, Throwable throwable) {
        super(message, code, throwable);
    }

    public PlatformException(Object data, String message, int code) {
        super(data, message, code);
    }

    public PlatformException(Object data, String message, int code, Throwable throwable) {
        super(data, message, code, throwable);
    }
}
